#if !defined(__DEAMON_SUB_PROCESS_H)

#include "sys/types.h"

#define MAX_FAIL_COUNT 10
//#define EXE_PATH "/usr/bin/gateway"  //正式
#define EXE_PATH "/home/zzzz/桌面/gataway/gateway_test"

typedef struct 
{
    pid_t pid;
    char *cmd_param;    //参数ota|app,根据这个创建子进程
    int fail_count;
}SubProcess;

//初始化一个进程
SubProcess *daemon_sub_process_init(char *cmd_param);

//检查进程是否已经启动（没启动启动，启动的不启动）
int daemon_sub_process_checkStart(SubProcess *sp);

//销毁一个进程
int daemon_sub_process_destroy(SubProcess *sp);

#define __DEAMON_SUB_PROCESS_H
#endif // __DEAMON_SUB_PROCESS_H
